/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.team1160.breakaway.endGame;

import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.Victor;

/**
 *
 * @author CJ
 */
public class Arm implements ModelNotifier{
    
    protected Victor WINCH = new Victor(9);
    protected Servo CLAW = new Servo(Constants.C_CLAW);

    public Arm(){
        this.WINCH.set(Constants.WINCH_ZERO);
        this.CLAW.set(Constants.CLAW_ZERO);
    }

    protected void setMotor(double speed){
        this.WINCH.set(speed);
    }
    
    protected void setServo(double pos){
        this.CLAW.set(pos);
    }

    public void activateMotor(boolean temp){
        if(temp){
            this.setMotor(Constants.WINCH_ACTIVATE);
        }else{
            this.setMotor(Constants.WINCH_ZERO);
        }
    }

    public void activateClaw(boolean temp){
        if(temp){
            this.setServo(Constants.CLAW_EXTEND);
        }else{
            this.setServo(Constants.CLAW_ZERO);
        }
    }

    public void updateModel(Model model){
        updateArm(model);
    }

    protected void updateArm(Model model){
        
    }

}
